home *** CD-ROM | disk | FTP | other *** search
/ Collection of Internet / Collection of Internet.iso / faq / comp / coherent / part1 < prev    next >
Internet Message Format  |  1994-02-13  |  7KB

  1. Path: bloom-beacon.mit.edu!paperboy.osf.org!think.com!sdd.hp.com!usc!sol.ctr.columbia.edu!news.kei.com!ub!dsinc!phent!kkress
  2. From: kkress@phent.UUCP (Kenneth R. Kress)
  3. Reply-To: dsinc!phent!kkress
  4. Followup-To: comp.os.coherent
  5. Newsgroups: comp.os.coherent,comp.answers,news.answers
  6. Distribution: world
  7. Subject: Mark Williams BBS Contents (part 1/2)
  8. Keywords: Coherent, files, programs, list
  9. Summary: This posting describes the files available from the Mark    Williams Bulletin Board System for the Coherent operating    system.
  10. Supersedes: <coherent-files/part1_758212915@PHENT.UUCP>
  11. Message-ID: <coherent-files/part1_761090594@PHENT.UUCP>
  12. Organization: That's Entertainment BBS
  13. Date: Sat, 12 Feb 94 17:03:15 EST
  14. Expires: 26 Jun 1994 22:03:14 GMT
  15. Approved: news-answers-request@MIT.Edu
  16. Lines: 189
  17. Xref: bloom-beacon.mit.edu comp.os.coherent:8801 comp.answers:3761 news.answers:15135
  18.  
  19. Archive-name: coherent-files/part1
  20. Last-modified: 1994/02/12
  21. Version: .5
  22.  
  23. I. Introduction:
  24. If you would like to be able to scan what's available from the Mark
  25. Williams Bulletin Board with a single command from the comfort of your
  26. own machine (without long distance charges), read on.
  27.  
  28. This is a part 1 of a posting of the contents of the Mark Williams 
  29. BBS machine. (in Chicago, IL. area code: (708); 1200/2400 baud: 559-0412; 
  30. 9600 baud Telebit: 559-0445; 9600 baud V.32/HST: 559-0452). The file 
  31. descriptions are also useful if you find a file on another Coherent site 
  32. and want to know what it is. (E.g., k5jb.zip, not to be confused with
  33. kbd40.tar.Z).
  34.  
  35. The list which follows in part 2 is /rdb format (which is plain text 
  36. with tab delimiters), and sorted from most recent to least. What follows
  37. are two scripts to help you use the listing: "mwfind" uses egrep and awk
  38. to put the /rdb record into a "pleasant" form; "mwmerge" uses ed to
  39. update the full listing with periodic diffs. I keep both scripts in
  40. /usr/local/bin. Edit these scripts to reflect where you choose to store
  41. the file list (I keep mine in $HOME/News/mwlist).
  42.  
  43. The diff list is posted monthly between quarterly postings of the full
  44. list. 
  45.  
  46.   Enjoy,
  47.         Ken.
  48.  
  49. P.S. I don't work for Mark Williams and I don't want you to call my
  50. BBS (It's for businesses). I get nothing out of this, except the warm
  51. fuzzy feeling of helping others. Feel free to make suggestions for 
  52. improvement.
  53.  
  54. II. The programs
  55. #--------------------------- begin mwfind -------------------------------
  56. # ---------------------------------------------------------------------    #
  57. #        NAME: mwfind
  58. #        COPYRIGHT: Copyright 1993 Kenneth R. Kress
  59. #         Right to distribute unmodified is hereby granted.
  60. #        USAGE: "USAGE: $0 pattern"
  61. #    modified 2/21/93 krk to add paths column
  62. #    modified 6/10/93 krk to add pieces column
  63. # ---------------------------------------------------------------------    #
  64. USAGE="USAGE: $0 pattern"
  65.  
  66. # ---------------------------------------------------------------------    #
  67. #        DESCRIPTION:
  68. # ---------------------------------------------------------------------    #
  69. # mwfind - reads a table with columns:
  70. #     file date size description notes requirements path pieces
  71. #    and returns lines matching the pattern. The output format
  72. #    includes descriptive labels and fields are separated by
  73. #     newlines; records are terminated by a blank line.
  74.  
  75.  
  76. # ---------------------------------------------------------------------    #
  77. #        TRAP:
  78. # ---------------------------------------------------------------------    #
  79. TMP=/tmp                # modify to suit
  80.  
  81. echo "$USAGE" > $TMP/$$tmp        # so trap has something to remove
  82. trap "rm -f $TMP/$$*" 0 1 2 3 15
  83.  
  84. # ---------------------------------------------------------------------    #
  85. #        DECLARATIONS:
  86. # ---------------------------------------------------------------------    #
  87. SRC="$HOME/News/mwlist"
  88. if [ ! -r "$SRC" ]
  89. then
  90.     echo "Error: $SRC was unreadable or missing." >&2
  91.     exit 1
  92. fi
  93. if [ -z "$1" ]
  94. then
  95.     echo "Error: $SRC was missing or empty." >&2
  96.     exit 1
  97. fi
  98.  
  99. PAT=`echo "$1" | tr 'A-Z' 'a-z'`
  100. # #####################################################################    #
  101. #        CODE BEGINS                        #
  102. # ---------------------------------------------------------------------    #
  103. egrep -y -e "$PAT" $SRC         |
  104. awk '
  105. BEGIN {
  106.     FS = OFS = "\t"
  107.     ONE = "Filename:"
  108.     TWO = "Size:"
  109.     THREE = "Date:"
  110.     FOUR = "Description:"
  111.     FIVE = "Notes:" 
  112.     SIX = "Requirements:"
  113.     SEVEN = "Path:"
  114.     EIGHT = "Pieces:"
  115. }
  116. {
  117.     print ""        # blank line between records
  118.     printf "%-12s %s\n", ONE, $1
  119.     printf "%-12s %s\n", THREE, $3
  120.     printf "%-12s %s\t",  TWO, $2
  121.     printf "%12s %s\n", EIGHT, $8
  122.     printf "%-12s %s\n",  FOUR, $4
  123.     printf "%-12s %s\n",  FIVE, $5
  124.     printf "%-12s %s\n",  SIX, $6
  125.     printf "%-12s %s\n",  SEVEN, $7
  126. }' 
  127.  
  128. # ---------------------------------------------------------------------    #
  129. #         CLEAN EXIT
  130. # ---------------------------------------------------------------------    #
  131.  
  132. exit 0
  133. #--------------------------- end mwfind ---------------------------------
  134. #--------------------------- begin mwmerge ------------------------------
  135. # ---------------------------------------------------------------------    #
  136. #        NAME: mwmerge
  137. #        COPYRIGHT: Copyright 1993 Kenneth R. Kress
  138. #         Right to distribute unmodified is hereby granted.
  139. #        USAGE: USAGE="usage: $0 changes"
  140. # ---------------------------------------------------------------------    #
  141. USAGE="usage: $0 diffs"
  142.  
  143. # ---------------------------------------------------------------------    #
  144. #        DESCRIPTION:
  145. # ---------------------------------------------------------------------    #
  146. # mwmerge - take the file of diffs ($1) and merge them 
  147. #    with the mwcbbs listing file (see SRC)
  148.  
  149. # ---------------------------------------------------------------------    #
  150. #        DECLARATIONS:
  151. # ---------------------------------------------------------------------    #
  152. #TEMPFILES:
  153. TMP=/tmp            #! modify to suit
  154. TMPA=$TMP/$$tmpa
  155. TMPB=$TMP/$$tmpb
  156.  
  157. #DATAFILES:
  158. SRC=$HOME/News/mwlist        #! modify to suit
  159. DEST=$SRC
  160.  
  161.  
  162. # ---------------------------------------------------------------------    #
  163. #        TRAP:
  164. # ---------------------------------------------------------------------    #
  165. echo "$USAGE" > $TMP/$$tmp        # so trap has something to remove
  166. trap "rm -f $TMP/$$*" 0 1 2 3 15
  167.  
  168. if [ "$#" -ne 1 ]
  169. then
  170.     echo "Error: Requires one and only one filename." >&2
  171.     exit 1
  172. fi
  173.  
  174. if [ ! -r "$1" ]
  175. then
  176.     echo "Error: $1 is unreadable or missing." >&2
  177.     exit 1
  178. fi
  179.  
  180. if [ ! -r "$SRC" ]
  181. then
  182.     SRC="/dev/null"
  183. fi
  184. # #####################################################################    #
  185. #        CODE BEGINS                        #
  186. # ---------------------------------------------------------------------    #
  187. cp $1             $TMPA
  188. cp $SRC            $TMPB
  189. echo "wq"         >> $TMPA
  190. cat $TMPA        |
  191. ed +v - $TMPB
  192. mv $TMPB         $DEST
  193.  
  194. # ---------------------------------------------------------------------    #
  195. #         CLEAN EXIT
  196. # ---------------------------------------------------------------------    #
  197.  
  198. # Clean up
  199. rm $TMP/$$*
  200.  
  201. # Exit
  202. exit 0
  203. #--------------------------- end   mwmerge ------------------------------
  204. -- 
  205. ......................................................................
  206. .           Ken Kress, Glenside, PA * dsinc!phent!kkress             .
  207. ......................................................................
  208.